package com.esri.core.tasks.ags.find;

import com.esri.core.geometry.Geometry;
import com.esri.core.internal.util.d;
import java.util.HashMap;
import java.util.Map;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class FindResult {
    private Map<String, Object> _attributes;
    private String _displayFieldName;
    private String _foundFieldName;
    private Geometry _geometry;
    private Geometry.Type _geometryType;
    private int _layerId;
    private String _layerName;
    private String _value;

    public int getLayerId() {
        return this._layerId;
    }

    public String getLayerName() {
        return this._layerName;
    }

    public String getDisplayFieldName() {
        return this._displayFieldName;
    }

    public String getFoundFieldName() {
        return this._foundFieldName;
    }

    public String getValue() {
        return this._value;
    }

    public Map<String, Object> getAttributes() {
        return this._attributes;
    }

    public Geometry.Type getGeometryType() {
        return this._geometryType;
    }

    public Geometry getGeometry() {
        return this._geometry;
    }

    public static FindResult fromJson(JsonParser jsonParser) throws Exception {
        if (d.c(jsonParser)) {
            FindResult findResult = new FindResult();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if ("layerId".equals(currentName)) {
                    findResult._layerId = jsonParser.getIntValue();
                } else if ("layerName".equals(currentName)) {
                    findResult._layerName = jsonParser.getText();
                } else if ("displayFieldName".equals(currentName)) {
                    findResult._displayFieldName = jsonParser.getText();
                } else if ("foundFieldName".equals(currentName)) {
                    findResult._foundFieldName = jsonParser.getText();
                } else if ("value".equals(currentName)) {
                    findResult._value = jsonParser.getText();
                } else if ("attributes".equals(currentName)) {
                    HashMap hashMap = new HashMap();
                    findResult._attributes = hashMap;
                    d.a(jsonParser, hashMap);
                } else if ("geometryType".equals(currentName)) {
                    findResult._geometryType = d.b(jsonParser.getText());
                } else if ("geometry".equals(currentName)) {
                    findResult._geometry = d.d(jsonParser);
                } else {
                    jsonParser.skipChildren();
                }
            }
            return findResult;
        }
        return null;
    }

    public String toString() {
        return "FindResult [_layerId=" + this._layerId + ", _layerName=" + this._layerName + ", _displayFieldName=" + this._displayFieldName + ", _foundFieldName=" + this._foundFieldName + ", _value=" + this._value + ", _attributes=" + this._attributes + ", _geometryType=" + this._geometryType + ", _geometry=" + this._geometry + "]";
    }
}
